package org.zjx.core;

import lombok.Data;

import java.net.InetSocketAddress;

@Data
public class SocketConfig {
    private String serverHost = "localhost";
    private int port = 8888;
    private long heartbeatInterval = 10000L;
    private long heartbeatTimeout = 30000L;

    private int maxConnections = 100; // 作为服务器允许客户端最大连接数

    private int poolMaxTotal = 50;            // 连接池最大连接数
    private long poolMaxIdleTime = 60000;     // 连接池最大空闲时间（毫秒）


    public InetSocketAddress getAddress() {
        return new InetSocketAddress(serverHost, port);
    }
}